//
//  CacheData+SeparateDown.h
//  KidReading
//
//  Created by linziyuan on 16/12/27.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import "CacheData.h"

@interface CacheData (SeparateDown)

//下载中更新状态
-(void)updateDowningBook:(NSInteger)bookid infoItem:(NSDictionary *)infoItem;
-(long long)getEditionForDownIngBook:(NSInteger)bookid url:(NSString *)url;

//下载完成更新状态
-(void)updateBook:(NSInteger)bookid CacheInfoData:(NSDictionary *)cacheInfo;
-(void)updateBook:(NSInteger)bookid CacheInfoData:(NSDictionary *)cacheinfo forUid:(NSInteger)uid;

//获取缓存数据
- (NSDictionary *)getCacheInfoForBook:(NSInteger)bookid currentInfoList:(NSDictionary *)infoList;
- (NSDictionary *)getCacheInfoForBook:(NSInteger)bookid currentInfoList:(NSDictionary *)infoList key:(NSString *)keystr isUpdate:(void (^)(BOOL))isupdate;
//获取需要下载的list
- (NSArray *)isBookNeedDown:(NSInteger)bookId currentInfoList:(NSDictionary *)infoList;
- (NSArray *)isBookNeedDown:(NSInteger)bookId currentInfoList:(NSDictionary *)infoList forUid:(NSInteger)uid;

/*移除用户下载记录**/
- (void)deleteDowninginfoWithbookid:(NSInteger)bookid downList:(NSArray *)listArr;
@end
